<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>GLSLNodeBuilder - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
		<p class="inheritance" translate="no"><a href="NodeBuilder.html">NodeBuilder</a> → </p>
	<h1 translate="no">GLSLNodeBuilder</h1>
		<section>
			<header>
				<div class="class-description"><p>A node builder targeting GLSL.</p>
<p>This module generates GLSL shader code from node materials and also
generates the respective bindings and vertex buffer definitions. These
data are later used by the renderer to create render and compute pipelines
for render objects.</p></div>
			</header>
			<article>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="GLSLNodeBuilder" translate="no">new <a href="#GLSLNodeBuilder">GLSLNodeBuilder</a><span class="signature">( object : <span class="param-type"><a href="Object3D.html">Object3D</a></span>, renderer : <span class="param-type"><a href="Renderer.html">Renderer</a></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new GLSL node builder renderer.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>object</strong>
									</td>
									<td class="description last">
										<p>The 3D object.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>renderer</strong>
									</td>
									<td class="description last">
										<p>The renderer.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="builtins" translate="no">.<a href="#builtins">builtins</a><span class="type-signature"> : Object.&lt;string, Array.&lt;string>></span> </h3>
					<div class="description">
						<p>A dictionary that holds for each shader stage an Array of used builtins.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="extensions" translate="no">.<a href="#extensions">extensions</a><span class="type-signature"> : Object.&lt;string, Map.&lt;string, Object>></span> </h3>
					<div class="description">
						<p>A dictionary that holds for each shader stage a Map of used extensions.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="transforms" translate="no">.<a href="#transforms">transforms</a><span class="type-signature"> : Array.&lt;Object.&lt;string, (<a href="AttributeNode.html">AttributeNode</a>|string)>></span> </h3>
					<div class="description">
						<p>An array that holds objects defining the varying and attribute data in
context of Transform Feedback.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="uniformGroups" translate="no">.<a href="#uniformGroups">uniformGroups</a><span class="type-signature"> : Object.&lt;string, Object.&lt;string, <a href="NodeUniformsGroup.html">NodeUniformsGroup</a>>></span> </h3>
					<div class="description">
						<p>A dictionary holds for each shader stage ('vertex', 'fragment', 'compute')
another dictionary which manages UBOs per group ('render','frame','object').</p>
					</div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="buildCode" translate="no">.<a href="#buildCode">buildCode</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>Controls the code build of the shader stages.</p>
						</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#buildCode">NodeBuilder#buildCode</a></dt>
						</dl>
					</div>
					<h3 class="name name-method" id="buildFunctionCode" translate="no">.<a href="#buildFunctionCode">buildFunctionCode</a><span class="signature">( shaderNode : <span class="param-type">ShaderNodeInternal</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Builds the given shader node.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>shaderNode</strong>
									</td>
									<td class="description last">
										<p>The shader node.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#buildFunctionCode">NodeBuilder#buildFunctionCode</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL function code.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="enableExtension" translate="no">.<a href="#enableExtension">enableExtension</a><span class="signature">( name : <span class="param-type">string</span>, behavior : <span class="param-type">string</span>, shaderStage : <span class="param-type">string</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Enables the given extension.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>name</strong>
									</td>
									<td class="description last">
										<p>The extension name.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>behavior</strong>
									</td>
									<td class="description last">
										<p>The extension behavior.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage.</p>
										<p>Default is <code>this.shaderStage</code>.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h3 class="name name-method" id="enableHardwareClipping" translate="no">.<a href="#enableHardwareClipping">enableHardwareClipping</a><span class="signature">( planeCount : <span class="param-type">string</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Enables hardware clipping.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>planeCount</strong>
									</td>
									<td class="description last">
										<p>The clipping plane count.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h3 class="name name-method" id="enableMultiview" translate="no">.<a href="#enableMultiview">enableMultiview</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>Enables multiview.</p>
						</div>
					</div>
					<h3 class="name name-method" id="generatePBO" translate="no">.<a href="#generatePBO">generatePBO</a><span class="signature">( storageArrayElementNode : <span class="param-type"><a href="StorageArrayElementNode.html">StorageArrayElementNode</a></span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Setups the Pixel Buffer Object (PBO) for the given storage
buffer node.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>storageArrayElementNode</strong>
									</td>
									<td class="description last">
										<p>The storage array element node.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The property name.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="generateTexture" translate="no">.<a href="#generateTexture">generateTexture</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span>, textureProperty : <span class="param-type">string</span>, uvSnippet : <span class="param-type">string</span>, depthSnippet : <span class="param-type">string</span>, offsetSnippet : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Generates the GLSL snippet for sampling/loading the given texture.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>texture</strong>
									</td>
									<td class="description last">
										<p>The texture.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>textureProperty</strong>
									</td>
									<td class="description last">
										<p>The name of the texture uniform in the shader.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>uvSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents texture coordinates used for sampling.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>depthSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the 0-based texture array index to sample.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>offsetSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#generateTexture">NodeBuilder#generateTexture</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="generateTextureBias" translate="no">.<a href="#generateTextureBias">generateTextureBias</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span>, textureProperty : <span class="param-type">string</span>, uvSnippet : <span class="param-type">string</span>, biasSnippet : <span class="param-type">string</span>, offsetSnippet : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Generates the GLSL snippet when sampling textures with a bias to the mip level.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>texture</strong>
									</td>
									<td class="description last">
										<p>The texture.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>textureProperty</strong>
									</td>
									<td class="description last">
										<p>The name of the texture uniform in the shader.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>uvSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents texture coordinates used for sampling.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>biasSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the bias to apply to the mip level before sampling.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>offsetSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="generateTextureCompare" translate="no">.<a href="#generateTextureCompare">generateTextureCompare</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span>, textureProperty : <span class="param-type">string</span>, uvSnippet : <span class="param-type">string</span>, compareSnippet : <span class="param-type">string</span>, depthSnippet : <span class="param-type">string</span>, offsetSnippet : <span class="param-type">string</span>, shaderStage : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Generates the GLSL snippet for sampling a depth texture and comparing the sampled depth values
against a reference value.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>texture</strong>
									</td>
									<td class="description last">
										<p>The texture.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>textureProperty</strong>
									</td>
									<td class="description last">
										<p>The name of the texture uniform in the shader.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>uvSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents texture coordinates used for sampling.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>compareSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the reference value.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>depthSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents 0-based texture array index to sample.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>offsetSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage this code snippet is generated for.</p>
										<p>Default is <code>this.shaderStage</code>.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="generateTextureGrad" translate="no">.<a href="#generateTextureGrad">generateTextureGrad</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span>, textureProperty : <span class="param-type">string</span>, uvSnippet : <span class="param-type">string</span>, gradSnippet : <span class="param-type">Array.&lt;string></span>, offsetSnippet : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Generates the GLSL snippet for sampling/loading the given texture using explicit gradients.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>texture</strong>
									</td>
									<td class="description last">
										<p>The texture.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>textureProperty</strong>
									</td>
									<td class="description last">
										<p>The name of the texture uniform in the shader.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>uvSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents texture coordinates used for sampling.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>gradSnippet</strong>
									</td>
									<td class="description last">
										<p>An array holding both gradient GLSL snippets.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>offsetSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="generateTextureLevel" translate="no">.<a href="#generateTextureLevel">generateTextureLevel</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span>, textureProperty : <span class="param-type">string</span>, uvSnippet : <span class="param-type">string</span>, levelSnippet : <span class="param-type">string</span>, offsetSnippet : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Generates the GLSL snippet when sampling textures with explicit mip level.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>texture</strong>
									</td>
									<td class="description last">
										<p>The texture.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>textureProperty</strong>
									</td>
									<td class="description last">
										<p>The name of the texture uniform in the shader.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>uvSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents texture coordinates used for sampling.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>levelSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>offsetSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="generateTextureLoad" translate="no">.<a href="#generateTextureLoad">generateTextureLoad</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span>, textureProperty : <span class="param-type">string</span>, uvIndexSnippet : <span class="param-type">string</span>, levelSnippet : <span class="param-type">string</span>, depthSnippet : <span class="param-type">string</span>, offsetSnippet : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Generates the GLSL snippet that reads a single texel from a texture without sampling or filtering.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>texture</strong>
									</td>
									<td class="description last">
										<p>The texture.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>textureProperty</strong>
									</td>
									<td class="description last">
										<p>The name of the texture uniform in the shader.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>uvIndexSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents texture coordinates used for sampling.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>levelSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>depthSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the 0-based texture array index to sample.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>offsetSnippet</strong>
									</td>
									<td class="description last">
										<p>A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getAttributes" translate="no">.<a href="#getAttributes">getAttributes</a><span class="signature">( shaderStage : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the shader attributes of the given shader stage as a GLSL string.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getAttributes">NodeBuilder#getAttributes</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet that defines the shader attributes.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getBitcastMethod" translate="no">.<a href="#getBitcastMethod">getBitcastMethod</a><span class="signature">( type : <span class="param-type">string</span>, inputType : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the bitcast method name for a given input and outputType.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>type</strong>
									</td>
									<td class="description last">
										<p>The output type to bitcast to.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>inputType</strong>
									</td>
									<td class="description last">
										<p>The input type of the.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The resolved WGSL bitcast invocation.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getClipDistance" translate="no">.<a href="#getClipDistance">getClipDistance</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the clip distances builtin.</p>
						</div>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The clip distances builtin.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getDrawIndex" translate="no">.<a href="#getDrawIndex">getDrawIndex</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the draw index builtin.</p>
						</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getDrawIndex">NodeBuilder#getDrawIndex</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The drawIndex shader string. Returns <code>null</code> if <code>WEBGL_multi_draw</code> isn't supported by the device.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getExtensions" translate="no">.<a href="#getExtensions">getExtensions</a><span class="signature">( shaderStage : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the enabled extensions of the given shader stage as a GLSL string.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet that defines the enabled extensions.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getFloatPackingMethod" translate="no">.<a href="#getFloatPackingMethod">getFloatPackingMethod</a><span class="signature">( encoding : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the float packing method name for a given numeric encoding.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>encoding</strong>
									</td>
									<td class="description last">
										<p>The numeric encoding that describes how the float values are mapped to the integer range.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The resolved GLSL float packing method name.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getFloatUnpackingMethod" translate="no">.<a href="#getFloatUnpackingMethod">getFloatUnpackingMethod</a><span class="signature">( encoding : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the float unpacking method name for a given numeric encoding.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>encoding</strong>
									</td>
									<td class="description last">
										<p>The numeric encoding that describes how the integer values are mapped to the float range.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The resolved GLSL float unpacking method name.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getFragCoord" translate="no">.<a href="#getFragCoord">getFragCoord</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the frag coord builtin.</p>
						</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getFragCoord">NodeBuilder#getFragCoord</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The frag coord builtin.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getFragDepth" translate="no">.<a href="#getFragDepth">getFragDepth</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the frag depth builtin.</p>
						</div>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The frag depth builtin.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getFrontFacing" translate="no">.<a href="#getFrontFacing">getFrontFacing</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the front facing builtin.</p>
						</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getFrontFacing">NodeBuilder#getFrontFacing</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The front facing builtin.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getInstanceIndex" translate="no">.<a href="#getInstanceIndex">getInstanceIndex</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Contextually returns either the vertex stage instance index builtin
or the linearized index of an compute invocation within a grid of workgroups.</p>
						</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getInstanceIndex">NodeBuilder#getInstanceIndex</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The instance index.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getInvocationLocalIndex" translate="no">.<a href="#getInvocationLocalIndex">getInvocationLocalIndex</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns a builtin representing the index of an invocation within its workgroup.</p>
						</div>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The invocation local index.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getInvocationSubgroupIndex" translate="no">.<a href="#getInvocationSubgroupIndex">getInvocationSubgroupIndex</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns a builtin representing the index of an invocation within its subgroup.</p>
						</div>
					</div>
					<h3 class="name name-method" id="getMethod" translate="no">.<a href="#getMethod">getMethod</a><span class="signature">( method : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the native shader method name for a given generic name.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>method</strong>
									</td>
									<td class="description last">
										<p>The method name to resolve.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getMethod">NodeBuilder#getMethod</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The resolved GLSL method name.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getOutputStructName" translate="no">.<a href="#getOutputStructName">getOutputStructName</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the output struct name. Not relevant for GLSL.</p>
						</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getOutputStructName">NodeBuilder#getOutputStructName</a></dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getPropertyName" translate="no">.<a href="#getPropertyName">getPropertyName</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, shaderStage : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns a GLSL snippet that represents the property name of the given node.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>node</strong>
									</td>
									<td class="description last">
										<p>The node.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage this code snippet is generated for.</p>
										<p>Default is <code>this.shaderStage</code>.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getPropertyName">NodeBuilder#getPropertyName</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The property name.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getStructMembers" translate="no">.<a href="#getStructMembers">getStructMembers</a><span class="signature">( struct : <span class="param-type"><a href="StructTypeNode.html">StructTypeNode</a></span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the members of the given struct type node as a GLSL string.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>struct</strong>
									</td>
									<td class="description last">
										<p>The struct type node.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet that defines the struct members.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getStructs" translate="no">.<a href="#getStructs">getStructs</a><span class="signature">( shaderStage : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the structs of the given shader stage as a GLSL string.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet that defines the structs.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getSubgroupIndex" translate="no">.<a href="#getSubgroupIndex">getSubgroupIndex</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns a builtin representing the index of the current invocation's subgroup within its workgroup.</p>
						</div>
					</div>
					<h3 class="name name-method" id="getSubgroupSize" translate="no">.<a href="#getSubgroupSize">getSubgroupSize</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns a builtin representing the size of a subgroup within the current shader.</p>
						</div>
					</div>
					<h3 class="name name-method" id="getTernary" translate="no">.<a href="#getTernary">getTernary</a><span class="signature">( condSnippet : <span class="param-type">string</span>, ifSnippet : <span class="param-type">string</span>, elseSnippet : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the native snippet for a ternary operation.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>condSnippet</strong>
									</td>
									<td class="description last">
										<p>The condition determining which expression gets resolved.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>ifSnippet</strong>
									</td>
									<td class="description last">
										<p>The expression to resolve to if the condition is true.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>elseSnippet</strong>
									</td>
									<td class="description last">
										<p>The expression to resolve to if the condition is false.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getTernary">NodeBuilder#getTernary</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The resolved method name.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getTransforms" translate="no">.<a href="#getTransforms">getTransforms</a><span class="signature">( shaderStage : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the transforms of the given shader stage as a GLSL string.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet that defines the transforms.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getTypeFromAttribute" translate="no">.<a href="#getTypeFromAttribute">getTypeFromAttribute</a><span class="signature">( attribute : <span class="param-type"><a href="BufferAttribute.html">BufferAttribute</a></span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the type for a given buffer attribute.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>attribute</strong>
									</td>
									<td class="description last">
										<p>The buffer attribute.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getTypeFromAttribute">NodeBuilder#getTypeFromAttribute</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The type.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getUniformFromNode" translate="no">.<a href="#getUniformFromNode">getUniformFromNode</a><span class="signature">( node : <span class="param-type"><a href="UniformNode.html">UniformNode</a></span>, type : <span class="param-type">string</span>, shaderStage : <span class="param-type">string</span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="NodeUniform.html">NodeUniform</a></span> </h3>
					<div class="method">
						<div class="description">
							<p>This method is one of the more important ones since it's responsible
for generating a matching binding instance for the given uniform node.</p>
<p>These bindings are later used in the renderer to create bind groups
and layouts.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>node</strong>
									</td>
									<td class="description last">
										<p>The uniform node.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>type</strong>
									</td>
									<td class="description last">
										<p>The node data type.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>name</strong>
									</td>
									<td class="description last">
										<p>An optional uniform name.</p>
										<p>Default is <code>null</code>.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getUniformFromNode">NodeBuilder#getUniformFromNode</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The node uniform object.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getUniforms" translate="no">.<a href="#getUniforms">getUniforms</a><span class="signature">( shaderStage : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the uniforms of the given shader stage as a GLSL string.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getUniforms">NodeBuilder#getUniforms</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet that defines the uniforms.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getVars" translate="no">.<a href="#getVars">getVars</a><span class="signature">( shaderStage : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the variables of the given shader stage as a GLSL string.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getVars">NodeBuilder#getVars</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet that defines the variables.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getVaryings" translate="no">.<a href="#getVaryings">getVaryings</a><span class="signature">( shaderStage : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the varyings of the given shader stage as a GLSL string.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>shaderStage</strong>
									</td>
									<td class="description last">
										<p>The shader stage.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getVaryings">NodeBuilder#getVaryings</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The GLSL snippet that defines the varyings.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getVertexIndex" translate="no">.<a href="#getVertexIndex">getVertexIndex</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Returns the vertex index builtin.</p>
						</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#getVertexIndex">NodeBuilder#getVertexIndex</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The vertex index.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="isAvailable" translate="no">.<a href="#isAvailable">isAvailable</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : boolean</span> </h3>
					<div class="method">
						<div class="description">
							<p>Whether the requested feature is available or not.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>name</strong>
									</td>
									<td class="description last">
										<p>The requested feature.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#isAvailable">NodeBuilder#isAvailable</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> Whether the requested feature is supported or not.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="isFlipY" translate="no">.<a href="#isFlipY">isFlipY</a><span class="signature">()</span><span class="type-signature"> : boolean</span> </h3>
					<div class="method">
						<div class="description">
							<p>Whether to flip texture data along its vertical axis or not.</p>
						</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#isFlipY">NodeBuilder#isFlipY</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> Returns always <code>true</code> in context of GLSL.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="needsToWorkingColorSpace" translate="no">.<a href="#needsToWorkingColorSpace">needsToWorkingColorSpace</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span><span class="type-signature"> : boolean</span> </h3>
					<div class="method">
						<div class="description">
							<p>Checks if the given texture requires a manual conversion to the working color space.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>texture</strong>
									</td>
									<td class="description last">
										<p>The texture to check.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeBuilder.html#needsToWorkingColorSpace">NodeBuilder#needsToWorkingColorSpace</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> Whether the given texture requires a conversion to working color space or not.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="registerTransform" translate="no">.<a href="#registerTransform">registerTransform</a><span class="signature">( varyingName : <span class="param-type">string</span>, attributeNode : <span class="param-type"><a href="AttributeNode.html">AttributeNode</a></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Registers a transform in context of Transform Feedback.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>varyingName</strong>
									</td>
									<td class="description last">
										<p>The varying name.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>attributeNode</strong>
									</td>
									<td class="description last">
										<p>The attribute node.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h3 class="name name-method" id="setupPBO" translate="no">.<a href="#setupPBO">setupPBO</a><span class="signature">( storageBufferNode : <span class="param-type"><a href="StorageBufferNode.html">StorageBufferNode</a></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Setups the Pixel Buffer Object (PBO) for the given storage
buffer node.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>storageBufferNode</strong>
									</td>
									<td class="description last">
										<p>The storage buffer node.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js" translate="no" target="_blank" rel="noopener">src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>